+function(){
  var userList = ['刘波', '盟主', '周波', '郭浩']
  window.$DD_loginSuccess = function() {
    console.log('登陆成功')
    setTimeout(function(){
      window.$DD_insertMsg = DD_insertMsg
    }, 2000)
  }
  window.$DD_qrcode = function(text) {
    window.$XDD_qrcode(text)
  }
  function DD_insertMsg(msg, conv, $XDD){
    if(msg.sendStatus == 2) return false
    $XDD.y.serviceAPI.User.userManager
      .getUsers({uids:[msg.baseMessage.openIdEx.openId]})
      .then(res => {
        var user = res[0].userProfileModel
        console.log(user.nick, ': ', msg.baseMessage.content.textContent.text)
        if(userList.indexOf(user.nick) != -1){
          conv.sendTextMsg('['+_.sample($XDD.emoji.defaultFaceConfig).name+']')
        }
      })
  }


}()
